﻿<Window x:Class="Morphing.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:uc="clr-namespace:Morphing.UserControls"
    xmlns:comp="clr-namespace:Morphing.Components"
    Height="710" Width="900" MinHeight="710" MinWidth="900" Background="{StaticResource BackgroundBrush}" Foreground="White" Name="mainWindow" WindowState="Maximized" AllowDrop="True" Drop="mainWindow_Drop" PreviewKeyDown="mainWindow_PreviewKeyDown" PreviewMouseWheel="mainWindow_PreviewMouseWheel" Icon="/Morphing;component/morphing.ico" Title="{StaticResource StrTitle}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <DockPanel Name="mainDock">
            <Border DockPanel.Dock="Top" Height="30">
                <Menu Height="23" VerticalAlignment="Top" Name="mainMenu">
                    <MenuItem Header="{DynamicResource StrFile}">
                        <MenuItem Name="menuNew" Header="{DynamicResource StrNew}" Click="menuNew_Click"/>
                        <MenuItem Name="menuOpen" Header="{DynamicResource StrOpen}" Click="menuOpen_Click"/>
                        <Separator />
                        <MenuItem Name="menuSave" Header="{DynamicResource StrSave}" Click="menuSave_Click"/>
                        <MenuItem Name="menuSaveAs" Header="{DynamicResource StrSaveAs}" Click="menuSaveAs_Click"/>
                        <Separator />
                        <MenuItem Name="menuClose"  Header="{DynamicResource StrClose}" Click="menuClose_Click"/>
                    </MenuItem>
                    <MenuItem Header="{DynamicResource StrScene}">
                        <MenuItem Name="menuCreateKeyFrame" Header="{DynamicResource StrCreateKeyFrame}" Click="menuCreateKeyFrame_Click" IsEnabled="False"/>
                        <MenuItem Name="menuDeleteKeyFrame" Header="{DynamicResource StrRemoveKeyFrame}" Click="menuDeleteKeyFrame_Click" IsEnabled="False"/>
                        <Separator />
                        <MenuItem Name="menuInsertImage"  Header="{DynamicResource StrInsertImage}" Click="menuInsertImage_Click"/>
                        <MenuItem Name="menuResolution" Header="{DynamicResource StrChangeProportions}" Click="menuResolution_Click"/>
                    </MenuItem>
                    <MenuItem Name="menuLanguage"  Header="{DynamicResource StrLanguage}" GotFocus="menuLanguage_Click">
                        <MenuItem Name="menuLanguageDefault" Header="English"/>
                    </MenuItem>
                    <MenuItem Header="{DynamicResource StrHelp}">
                        <MenuItem Name="menuAbout" Header="{DynamicResource StrAbout}" Click="menuAbout_Click"/>
                    </MenuItem>
                </Menu>
                <Border.Background>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Offset="0.6" Color="#303030" />
                        <GradientStop Offset="0.9" Color="#191919" />
                    </LinearGradientBrush>
                </Border.Background>
            </Border>
            <uc:TimeLine x:Name="timeLine" DockPanel.Dock="Top" VerticalAlignment="Top" Width="{Binding ElementName=mainDock, Path=ActualWidth}" />
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <StackPanel Style="{StaticResource ToolsPanel}" Orientation="Vertical">
                    <RadioButton Name="btnWarping" PreviewMouseDown="btnWarping_Click" IsChecked="True">
                        <Viewbox>
        	                <Canvas Width="52.4" Height="39.869">
        		                <Path Width="45.8065" Height="34.7745" Canvas.Left="3.47967" Canvas.Top="2.7976" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FFA29D9D" Data="M 25.5364,37.0721L 29.98,23.8261L 24.6216,6.485L 8.88181,4.76435L 3.97967,18.5402L 9.41093,32.3351L 25.2867,36.915L 47.1778,33.9491L 48.7862,15.4812L 41.8188,3.2976L 24.6162,6.37244M 48.7084,15.5414L 30.2215,23.8144L 4.46821,18.6294"/>
        		                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="4.92912" Canvas.Top="0" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50558" Height="8.50557" Canvas.Left="20.2853" Canvas.Top="2.03667" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50557" Height="8.50558" Canvas.Left="43.8944" Canvas.Top="11.2507" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="37.4567" Canvas.Top="0.245956" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="42.91" Canvas.Top="29.255" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50557" Height="8.50558" Canvas.Left="25.5099" Canvas.Top="18.7193" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="-2.38419e-007" Canvas.Top="14.117" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="4.77934" Canvas.Top="27.8625" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        		                <Ellipse Width="8.50558" Height="8.50557" Canvas.Left="21.358" Canvas.Top="31.3634" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF757575" Fill="#FF252525"/>
        	                </Canvas>
                        </Viewbox>
					</RadioButton>
                    <RadioButton Name="btnGridControl" PreviewMouseDown="btnGridControl_Click">
                        <Viewbox>
                            <Canvas Width="57.8167" Height="39.748">
                                <Path Width="51.75" Height="34.9167" Canvas.Left="3.60834" Canvas.Top="2.99901" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF5D5C5C" Data="M 31.5346,3.49901L 25.7948,16.8461L 30.8968,34.8734L 48.5718,37.4157L 54.8583,23.5486L 49.4803,9.14996L 31.8079,3.67235L 6.93269,5.6254L 4.10834,24.4616L 11.3086,37.286L 30.8968,34.9889M 4.19944,24.4038L 25.5215,16.8461L 54.3117,23.433"/>
                                <Ellipse Width="8.50557" Height="8.50558" Canvas.Left="4.09579" Canvas.Top="1.13" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50558" Height="8.50557" Canvas.Left="27.702" Canvas.Top="3.8147e-006" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="49.3111" Canvas.Top="18.5473" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50558" Height="8.50558" Canvas.Left="44.79" Canvas.Top="4.37595" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="42.7433" Canvas.Top="30.9683" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50558" Height="8.50558" Canvas.Left="21.7599" Canvas.Top="12.5993" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="-1.19209e-007" Canvas.Top="19.247" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50557" Height="8.50557" Canvas.Left="6.27934" Canvas.Top="31.2425" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                                <Ellipse Width="8.50558" Height="8.50557" Canvas.Left="26.108" Canvas.Top="29.6601" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF484747" Fill="#FF8B8989"/>
                            </Canvas>
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Name="btnSelect" Click="btnSelect_Click">Select</RadioButton>
                    <RadioButton Name="btnText" Click="btnText_Click">
                        <TextBlock FontSize="40" FontFamily="Times New Roman">T</TextBlock>
                    </RadioButton>
                        <RadioButton Name="btLine" Click="btnLine_Click">
                            <Line Stroke="{StaticResource GlyphBrush}" StrokeThickness="2" X1="0" Y1="1" X2="1" Y2="0" Width="50" Height="30" Stretch="Fill"/>
                        </RadioButton>
                        <RadioButton Name="btnRectangle" Click="btnRectangle_Click">
                        <Rectangle Stroke="{StaticResource GlyphBrush}" StrokeThickness="2" Width="50" Height="30" />
                    </RadioButton>
                    <RadioButton Name="btnEllipse" Click="btnEllipse_Click">
                        <Ellipse Stroke="{StaticResource GlyphBrush}" StrokeThickness="2" Width="50" Height="30" />
                    </RadioButton>
                    <RadioButton Name="btnPolygon" Click="btnPolygon_Click">
                        <Polygon Stroke="{StaticResource GlyphBrush}" Points="0.5,0 1,0.4 0.8,1 0.2,1 0,0.4" StrokeThickness="2" Width="40" Height="35" Stretch="Fill"/>
                    </RadioButton>
                    <RadioButton Name="btnBitmap" Click="btnBitmap_Click">Bitmap</RadioButton>
                </StackPanel>
                <Border Grid.Column="1" CornerRadius="20" Background="{StaticResource NormalBrush}" Padding="8" Margin="0,0,5,0" BorderThickness="1" BorderBrush="Black">
                    <ScrollViewer TabIndex="99" HorizontalScrollBarVisibility="Visible" FocusVisualStyle="{x:Null}">
                        <Border BorderBrush="Black" BorderThickness="1.5" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <comp:Scene x:Name="scene" Width="800" Height="600"/>
                        </Border>
                    </ScrollViewer>
                 </Border>
                <Rectangle HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="18" Height="18" Fill="{StaticResource NormalBrush}" StrokeThickness="0" Grid.Column="1" Margin="0,0,14,9"/>
            </Grid>
        </DockPanel>
        <Border Grid.Row="1">
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0.3" Color="#191919" />
                    <GradientStop Offset="1" Color="Black" />
                </LinearGradientBrush>
            </Border.Background>
            <Grid>
                <Slider HorizontalAlignment="Left" Margin="10,9,0,7" Name="sliderGridResolution" Width="150" Minimum="2" Maximum="30" TickPlacement="BottomRight" TickFrequency="3.5" Value="16" SmallChange="1" ValueChanged="sliderGridResolution_ValueChanged"/>
                <Label HorizontalAlignment="Left" VerticalContentAlignment="Center" Foreground="{StaticResource LightBkgBrush}" Margin="162,0,0,0" Content="{DynamicResource StrGridResolution}"/>
                <StackPanel Style="{StaticResource NaviPanel}" Grid.Row="1">
                    <Button Name="btnStart" Click="btnStart_Click">
                        <Polygon Points="0,0 -0.2,0 -0.2,1 0,1 0,0.5 1,0 1,1 0,0.5"/>
                    </Button>
                    <Button  Name="btnPrevKey" Click="btnPrevKey_Click">
                        <Polygon Points="0,0.5 1,0 1,0.5 2,0 2,1 1,0.5 1,1"/>
                    </Button>
                    <Button  Name="btnPrev" Click="btnPrev_Click">
                        <Polygon Points="0,0.5 1,0 1,1"/>
                    </Button>
                    <Button Name="btnNext" Click="btnNext_Click">
                        <Polygon Points="1,0.5 0,1 0,0"/>
                    </Button>
                    <Button Name="btnNextKey" Click="btnNextKey_Click">
                        <Polygon Points="1,0.5 0,1 0,0 1,0.5 1,0 2,0.5 1,1"/>
                    </Button>
                    <Button  Name="btnEnd" Click="btnEnd_Click">
                        <Polygon Points="1,0 1.2,0 1.2,1 1,1 1,0.5 0,1 0,0 1,0.5"/>
                    </Button>
                </StackPanel>                
                <Slider HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,30,0" Name="sliderZoom" Width="150" Value="5" TickPlacement="BottomRight" SmallChange="1" VerticalContentAlignment="Center" ValueChanged="sliderZoom_ValueChanged" Minimum="1" Maximum="9" />
                <Label HorizontalAlignment="Right" Margin="0,0,186,6" Width="20" FontFamily="Arial Bold" FontWeight="Bold" FontSize="14" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="{StaticResource GlyphBrush}">-</Label>
                <Label HorizontalAlignment="Right" Margin="0,0,6,6" Width="20" FontFamily="Arial Bold" FontWeight="Bold" FontSize="14" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="{StaticResource GlyphBrush}">+</Label>
            </Grid>
        </Border>  
    </Grid>
</Window>
